<template lang="">
  <button @click="count++">count的值是：{{count}}</button>
</template>

<script lang="ts">
import { defineComponent,ref } from "vue";
//选项卡(Options)的API
export default defineComponent({
        name: "Homework1",
        data(){
            return {
            count:0
            }
        },
        methods:{
            increment(this:any){
                this.count++;
            }
        },
        mounted(this:any){
            console.log(`应用初始化时count=${this.count}`);
        }
    });
</script>